<script setup>
import StringOrNumber from '../../../StringOrNumber.vue';
import { onMounted, reactive } from 'vue';
const props = defineProps({
    probeConfig: {
        type: Object
    },
    containerIndex: {
        type: Number,
    },
    probeType: {
        type: String
    },
    containerType: {
        type: String
    }
})
const rules = reactive({
    port: [
        {required: true, message: '请输入需要探测的端口号', trigger: 'blur'}
    ]
})
// onMounted(()=>{
//   console.log("接收的数据:", props.probeConfig)
// })
</script>

<template>
    <el-row :gutter="20">
      <el-col :span="8">
        <el-form-item label="探测端口" :rules="rules.port" :prop="('spec.template.spec.containers.'+props.containerIndex+'.'+props.probeType+'.tcpSocket.port')" required>
          <StringOrNumber v-model:data="props.probeConfig.tcpSocket.port" placeholder="请输入需要检查的端口号" input-width="240px"></StringOrNumber>
      </el-form-item>
      </el-col>
      <el-col :span="8">
        <el-form-item label="探测主机"  prop="">
          <el-input v-model="props.probeConfig.tcpSocket.host" style="width: 240px;" placeholder="可选, 请输入需要探测的主机"></el-input>
      </el-form-item>
      </el-col>
    </el-row>
</template>

<style scoped>

</style>
